#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int a,a2;
    cin>>a;
    a2=a;
    int b[100000]={},e1=0,e2=1;
    for(int c=0;c<a;c++){
        cin>>b[c];
    }
    sort(b,b+a);
    while(e2<a){
        if(b[e2]>b[e1]){
            a2--;
            e2++;
            e1++;
        }else{
            e2++;
        }
    }
    cout<<a2;
    return 0;
}
